package lib.self.ex;

import androidx.annotation.ColorInt;
import androidx.annotation.DrawableRes;
import androidx.annotation.LayoutRes;


/**
 * description: ParamsEx
 * author: Steven Xiao
 * date: 2017/5/2
 */
public class ParamsEx {
    private static final String TAG = ParamsEx.class.getSimpleName();

    //StatusBar颜色
    private static int mStatusBarColor = 0;

    private static int mNavigationBarColor = 0;

    // APP背景颜色
    @ColorInt
    private static int mAppBgColor = 0;

    // App背景图片
    private static int mAppBgDrawableId = 0;

    // 加载时的布局
    @LayoutRes
    private static int mLoadingViewId = 0;

    //加载错误时的布局
    @LayoutRes
    private static int mErrorViewId = 0;

    public static int getStatusBarColor() {
        return mStatusBarColor;
    }

    public static void setStatusBarColor(int statusBarColor) {
        ParamsEx.mStatusBarColor = statusBarColor;
    }

    public static int getNavigationBarColor() {
        return mNavigationBarColor;
    }

    public static void setNavigationBarColor(int navigationBarColor) {
        ParamsEx.mNavigationBarColor = navigationBarColor;
    }

    public static int getAppBgColor() {
        return mAppBgColor;
    }

    public static void setAppBgColor(int appBgColor) {
        ParamsEx.mAppBgColor = appBgColor;
    }

    public static int getAppBgDrawableId() {
        return mAppBgDrawableId;
    }

    public static void setAppBgDrawableId(int appBgDrawableId) {
        ParamsEx.mAppBgDrawableId = appBgDrawableId;
    }

    public static int getLoadingViewId() {
        return mLoadingViewId;
    }

    public static void setLoadingViewId(@LayoutRes int loadingViewId) {
        ParamsEx.mLoadingViewId = loadingViewId;
    }

    public static int getErrorViewId() {
        return mErrorViewId;
    }

    public static void setErrorViewId(@LayoutRes int errorViewId) {
        ParamsEx.mErrorViewId = errorViewId;
    }

    /**
     * TitleBar属性设置
     */
    public static class TitleBarParams {
        private static int mHeightDp = 0;
        private static int mTextSizeLeftDp = 0;
        private static int mTextSizeMidDp = 0;
        private static int mTextSizeRightDp = 0;
        private static int mTextMarginHorizontalDp = 0;

        @ColorInt
        private static int mTextColor = 0;

        @DrawableRes
        private static int mBgDrawableId = 0;

        @ColorInt
        private static int mBgColor = 0;

        /**
         * 获取背景资源id
         *
         * @return 默认无资源时为0
         */
        public static int getBgDrawableId() {
            return mBgDrawableId;
        }

        /**
         * 设置背景资源id
         *
         * @param id
         */
        public static void setBgDrawableId(@DrawableRes int id) {
            TitleBarParams.mBgDrawableId = id;
        }

        public static int getBgColor() {
            return mBgColor;
        }

        public static void setBgColor(@ColorInt int bgColor) {
            TitleBarParams.mBgColor = bgColor;
        }

        public static int getHeightDp() {
            return mHeightDp;
        }

        public static void setHeightDp(int heightDp) {
            TitleBarParams.mHeightDp = heightDp;
        }

        public static int getTextSizeLeftDp() {
            return mTextSizeLeftDp;
        }

        public static void setTextSizeLeftDp(int textSizeLeftDp) {
            TitleBarParams.mTextSizeLeftDp = textSizeLeftDp;
        }

        public static int getTextColor() {
            return mTextColor;
        }

        public static void setTextColor(@ColorInt int textColor) {
            TitleBarParams.mTextColor = textColor;
        }

        public static int getTextMarginHorizontalDp() {
            return mTextMarginHorizontalDp;
        }

        public static void setTextMarginHorizontalDp(int textMarginHorizontalDp) {
            TitleBarParams.mTextMarginHorizontalDp = textMarginHorizontalDp;
        }

        public static int getTextSizeMidDp() {
            return mTextSizeMidDp;
        }

        public static void setTextSizeMidDp(int textSizeMidDp) {
            TitleBarParams.mTextSizeMidDp = textSizeMidDp;
        }

        public static int getTextSizeRightDp() {
            return mTextSizeRightDp;
        }

        public static void setTextSizeRightDp(int textSizeRightDp) {
            TitleBarParams.mTextSizeRightDp = textSizeRightDp;
        }
    }


}
